﻿@model Zor_Web.Models.Stat.V_TaxRevenueStat
@using Webdiyer.WebControls.Mvc;
@using Zor_Tools;
@{
    Layout = null;
}
<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>税收统计总览</title>
    <link href="~/Content/LayerUI/src/css/layui.css" rel="stylesheet" />
    <link href="~/Content/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
    <link href="~/Content/Styles/zor.css" rel="stylesheet" />
    <!-- 框架必要 -->
    <script src="~/Content/Scripts/jquery/jquery-1.9.1.min.js"></script>
    <script src="~/Content/Scripts/learunui-framework.js"></script>
    <script src="~/Content/Scripts/Zor_AJax.js"></script>
    <!-- 消息提示 -->
    <script language='javascript' src='~/Content/layer/layer.js'></script>
    <!--Echerts -->
    <script src="~/Content/Scripts/Echart/echarts.min.js"></script>
</head>
<body>
    <!-- 为ECharts准备一个具备大小（宽高）的Dom -->
    <div id="HrCharts"></div>
</body>
</html>
<script>



    //获取税收统计总览小计（）
    var Pt_ActualTax;
    getAjax("/Stat/TaxPandectPt_ActualTax", "", function (data) {
        Pt_ActualTax = eval(data);
    })

    //获取税收统计总览年月 
    var Tax_Month;
    getAjax("/Stat/TaxPandect_Months", "", function (data) {
        Tax_Month = eval(data);
    })

    // 基于准备好的dom，初始化echarts实例
    var myChart = document.getElementById('HrCharts');

    var myChartContainer = function () {
        myChart.style.width = (window.innerWidth - 50) + 'px';
        myChart.style.height = (window.innerHeight) + 'px';
    };
    myChartContainer();
    var eChart = echarts.init(myChart);
    // 指定图表的配置项和数据

    option = {
        title: {
            text: '税收统计总览图',
            subtext: '年度总览'
        },
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data: ['税收额/元']
        },
        toolbox: {
            show: true,
            feature: {
                dataZoom: {
                    yAxisIndex: 'none'
                },
                dataView: { readOnly: false },
                magicType: { type: ['line', 'bar'] },
                restore: {},
                saveAsImage: {}
            }
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: Tax_Month
        },
        yAxis: {
            type: 'value',
            axisLabel: {
                formatter: '{value} 元'
            }
        },
        series: [
            {
                name: '税收额/元',
                type: 'line',
                data: Pt_ActualTax,
      
                markLine: {
                    data: [
                        { type: 'average', name: '平均值' },
                        [{
                            symbol: 'none',
                            x: '90%',
                            yAxis: 'max'
                        }, {
                            symbol: 'circle',
                            label: {
                                normal: {
                                    position: 'start',
                                    formatter: '税收额最大值'
                                }
                            },
                            type: 'max',
                            name: '最高点'
                        }]
                    ]
                }
            }
       
        ]
    };

    // 使用刚指定的配置项和数据显示图表。
    eChart.setOption(option);
    //浏览器大小改变时重置大小
    window.onresize = function () {
        myChartContainer();
        eChart.resize();
    };
</script>

